﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Models;
using BLL;

namespace Workflow
{
    public partial class StatusPerson : System.Web.UI.Page
    {
        public List<WorkflowChildStatus> resultList = new List<WorkflowChildStatus>();
        private WorkflowManager objWorkflowManager = new WorkflowManager();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                int workParentId = Convert.ToInt32(Context.Request["WorkParentId"]);
                int statusNo = Convert.ToInt32(Context.Request["statusNo"]);
                try
                {
                    resultList = objWorkflowManager.GetWorkflowChildStatus2(workParentId, statusNo);
                }
                catch (Exception ex)
                {

                    string msg = string.Format("<script>alert('{0}')</script>", ex.Message);
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "alert", msg);
                }
            }
        }
    }
}